import request from '@/utils/request'

// 查询外部农机列表
export function listMachinery(query) {
  return request({
    url: '/sync/machinery/list',
    method: 'get',
    params: query
  })
}


// 查询外部农机接口
export function listOuterMachinery(query) {
  return request({
    url: '/agricultural/machinery/list',
    method: 'get',
    params: query
  })
}

// 查询内部农机接口
export function listInnerMachinery(query) {
  return request({
    url: '/sync/machinery/list',
    method: 'get',
    params: query
  })
}

// 查询外部农机详细
export function getMachinery(id) {
  return request({
    url: '/sync/machinery/' + id,
    method: 'get'
  })
}

// 新增外部农机
export function addMachinery(data) {
  return request({
    url: '/sync/machinery',
    method: 'post',
    data: data
  })
}

// 修改外部农机
export function updateMachinery(data) {
  return request({
    url: '/sync/machinery',
    method: 'put',
    data: data
  })
}

// 删除外部农机
export function delMachinery(id) {
  return request({
    url: '/system/machinery/' + id,
    method: 'delete'
  })
}
